package academic.ui.client.widgets;

import ui.client.GenericClickable;
import ui.client.GenericContainerTag;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Image;



public class SignInDiv extends Composite {

	private GenericClickable signInLink = new GenericClickable("a");
	
	private GenericContainerTag div = new GenericContainerTag("div");
	
	public SignInDiv() {
		div.setStyleName("page_content");
		GenericContainerTag h3 = new GenericContainerTag("h3", "Already Have An Account?");
		GenericContainerTag p = new GenericContainerTag("p","If you have purchased a Soco Deal before, simply sign in using your email address");
		div.add(h3);
		div.add(p);
		
		signInLink.getElement().setAttribute("rel", "#signInModal");
		signInLink.getElement().setId("checkoutLoginLink");
		Image img = new Image(GWT.getModuleBaseURL()+"images/signin.gif");
		img.setSize("119px", "55px");
		signInLink.add(img);
		div.add(signInLink);
		GenericContainerTag p2 = new GenericContainerTag("p","Did you know you can sign in using Facebook?");
		div.add(p2);
		GenericContainerTag fbLogin = new GenericContainerTag("fb:login-button");
		div.add(fbLogin);
		initWidget(div);
	}
	
	public HasClickHandlers getSignInLink() {
		return signInLink;
	}
}
